package proyecto.controller;

public class BasedeDatos {
    
    private static BasedeDatos OConexion;
    private String driver; //Aunque ya se tiene la libreria se necesita definir el driver
    private String connectString;
    private String user;
    private String password;
    
    private BasedeDatos(){
        this.driver = "org.postgresql.Driver"; //Acceso al Driver
        this.connectString = "jdbc:postgresql://localhost:5432/postgres";
        this.user = "postgres";
        this.password = "ADMIN";
    }

    public static BasedeDatos crear_conexion(){
        if(OConexion == null)
            OConexion = new BasedeDatos();
        return OConexion;
    }
    
    public String getDriver() {
        return driver;
    }

    public String getConnectString() {
        return connectString;
    }

    public String getUser() {
        return user;
    }

    public String getPassword() {
        return password;
    }
}